﻿Element.prototype.get_SelectionStart = function get_SelectionStart()
{
	if (this.selectionStart != null)
	{
		return this.selectionStart;
	}

	var oSel = document.selection.createRange();
	oSel.moveEnd('character', this.value.length);
	return this.value.length - oSel.text.length;
};
